package cn.tude.xctf.boot1.controller;

import cn.tude.xctf.boot1.entity.Emp;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class ParamController {
    @RequestMapping("/p1")
    @ResponseBody
    public String p1(String info){
        System.out.println("info"+info);
        return "接收到";
    }
    @RequestMapping("/p2")
    @ResponseBody
    public String p1(String name,String sal,String job){
        System.out.println("姓名"+name+"，工资"+sal+"，工作"+job);
        return "接收到";
    }

    @RequestMapping("/p2")
    @ResponseBody
    public String p3(Emp emp){

        return emp.toString();
    }



}
